home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
apps
/
564
/
sub_cal
/
sub_cal.hlp
< prev
next >
Wrap
Text File
|
1991-09-11
|
21KB
|
471 lines
6 6 14 50 V.2.00
*****************
** SUB_CAL **
*****************
A subset of
EL_CAL: The Elementary Calculator
© 1989, 1991 by J.Andrzej Wrotniak
Distributed by Debonair Software
To view a page, click on its top-right corner.
To change volume or to rearrange pages,
click on the proper volume number.
MENU OPERATIONS
Among options available from the Menu Bar are:
* <Use|Calculator> switches to the Sub_Cal panel.
* <Use|Linear Algebra> invokes the Linear Algebra
Panel (see the last Help volume).
* <Options|Switch Screen Colors> - obvious.
* <File|Quit> exits the program.
Most of other entries are disabled permanently in
Sub_Cal (they are available in El_Cal only).
Similarly, screen buttons corresponding to
features available only in the full El_Cal are
filled with grey; clicking on them has no effect.
For more about El_Cal (in case you think you
may need it), see Vol.6 of this help file.
DISPLAY LINES
* Most of the time Sub_Cal operates on display
lines (in the LCD-like display at the top).
* Display lines may be typed in or entered with
the mouse. Mouse entries will be always added at
the end of display line, regardless of the text
cursor position.
* Case is not significant and spaces are ignored.
* Switching between (up to 20) lines - by using
[⇦] and [⇨] at the top. Clicking on the line
number (between the arrows) jumps to Line 1.
* [⇩] enables auto-scroll: after RETURN or clic-
king on the display the current line will be
computed and the next one will be displayed.
EDITING FUNCTIONS, DATA FORMATTING
* [RST] clears all lines and variables.
* [CLR] clears the current line.
* [BSP] removes the last entry from the line.
* The buttons shown as [F][n] or [E][n] at the top
set the format (fixed or exponential) and number
of fractional digits in variable display. This
does not affect the accuracy of variables, which
are always stored with 16-digit precision.
Buttons allowing to echo all operations to a
printer, and to perform disk operations, are dis-
abled in Sub_Cal.
COMPUTING DISPLAYED EXPRESSIONS
* Click on the main display (or just press RETURN)
to compute the current line and store the result
in the "destination variable" on the right.
* Clicking on [⇨] and then on a variable from the
pop-up menu will nominate a new destination
variable and execute the current line.
* Keyboard shortcut for the above: type the ex-
pression, then "=" and variable name, e.g. 2*3=Z
* To choose destination variable without executing
the line: click on the destination variable but-
ton, and then on the variable to choose.
* "✓" left of display means, that the line was
computed; next mouse entry will start a new one.
VARIABLES AND NUMBERS
* Variables A..Z are used to store data, or as
components of expressions.
* To modify a variable, double-click on its value.
* To reviev or restore previous values of a varia-
ble, single-click on its value field.
* Clicking on a variable value while Shift is held
down will show it with all 16 digits of accuracy
* t is a dummy variable, used in some macros (e.g.
plotting). It cannot be used to store data.
* Constants: Ee (Euler's e = 2.71...) and Pi are
treated in expressions the same way as variables
* Numbers may use decimal exponent [E]: 1E6 or E6.
* Zero before fraction is optional: .8 means 0.8 .
OPERATORS
* Arithmetic operators: [+], [-], [*], [/], [^]
(power) have generally accepted priorities.
* Implied multiplication: the "*" sign can be
omitted between two variables or between a value
and variable, e.g. 2A or 6.6PiXY. Implied multi-
plication has the same priority as "^" (highest)
* Operators of equal priority are executed from
left to right, except for "^" and implied mul-
tiplication, e.g. A^B^CD ≡ A^(B^(C*D)), but
2Pi^3A ≡ 2*(Pi^(3*A)).
* Parentheses () can be nested to any depth; mis-
sing ones at the beginning and at the end will
be added, e.g. 5+2)*(8-3 is legal and gives 35.
FUNCTIONS - GENERAL
* Most of the functions accept a single argument.
If this argument is a variable, a value, or a
product using implied multiplication, then it
does not need to be enclosed in parentheses,
e.g. SIN A or LOG 2Pi, but COS(Pi/3).
* ATN2 and the statistical functions accept two
or three arguments, which need to be separated
with commas, e.g. FGAU(t+.2,2A,B-A) or ATN2(1,1)
* Function evaluation has the same priority as po-
wer and implied multiplication. This means that
EXP A^2 ≡ EXP(A^2) but EXP 2*A ≡ (EXP 2)*A.
* The [⇦][⇨] buttons switch between three Function
Panels: Standard, Statistical and User-Defined.
STANDARD MATH FUNCTIONS
* SIN, COS, TAN, COT may be used with [ARC] and/or
[HYP] switches, e.g. [ARC][HYP][COT] gives ACOTH
* The [ARC] switch has to be re-entered for each
function, while [HYP] will stay on until reset.
* ATN2(Y,X) computes arctan(y/x) in (0,2Pi)
* The [Rad]/[Deg] button sets the angular mode,
valid at the computing (not entry!) time.
* LN and EXP - with base e, 10 or 2 will give LN,
LOG or LG2 and EXP, TEN and TWO (base to...).
Choosing the base will change appropriately the
text on [LN] and [EXP] buttons.
* ABS, INV - absolute value and reciprocal (1/x).
* INT, FRA - integer and fractional part.
STATISTICAL DISTRIBUTION FUNCTIONS
Prefixes F, P, Q and A denote the function type:
* F - distribution density
* P - left probability integral, Prob(X<x)
* Q - right probability integral, Prob(X≥x)
* A - central integral, Prob(abs(X-m)<abs(x-m))
For discrete cases "density" should be replaced
with "probability" and "integral" - with "sum".
X stands here for the random variate, x - for fun-
ction argument and m - for distributon mean value.
* I preceding P, Q or A means "inverse", e.g.
IPGAU(t) returns x for which PGAU(x) = t.
SUPPORTED DISTRIBUTIONS
Sub_Cal supports only the Gaussian (or Normal)
distribution. To access seven other distributions,
you need the full version of El_Cal.
The [GAU] button will enter one of the seven
possible functions for the Gaussian distribution,
depending on the status of buttons [F], [P], [Q],
[A] and [I] described in the previous page.
These functions accept three parameters: x, m
and s, where m and s are mean and standard
deviation of the distribution, respectively.
RANDOM NUMBERS, EULER FUNCTIONS
A pseudorandom generator function is available:
* XGAU(m,s) - from Normal distribution (m,s).
(El_Cal supports three other distributions here).
The [S] button reseeds the generator.
Natural logarithm of the Euler's Gamma is also
available LGM(x) - natural logarithm of Gamma(x).
(Again, five more related functions are accessible
in El_Cal).
USER-DEFINED AND CONDITIONAL FUNCTIONS
DF1..DF2 (or just DFx) are user-defined functions:
* [DEF][DFx] defines the current line as a func-
tion with "t" as dummy argument.
* [SHOW][DFx] recalls a defined function to the
display (e.g. for modification).
* [CLR][DFx] un-defines a function.
* One DFx function can call another, preceding it
on the list, e.g. DF2 can call DF1.
IFN, IFZ and IFP are conditional functions (stan-
ding for "if negative", "if zero", "if positive"):
* IFx(x1,x2,x3) will return x2 if x1 has the requ-
ired sign, and x3 otherwise. This means that one
of the (x2,x3) is not being evaluated at all.
CONSTANTS AND UNIT CONVERSION
Clicking on [CONST] allows to store a constant in
one of the Sub_Cal variables:
* The button next to "Store" selects the constant,
one next to "in" chooses the variable.
* Some constants allow for a choice of units; in
such cases a "Converted to" button will appear.
The [UNITS] button calls the unit conversions:
* The "Convert" button selects the physical quan-
tity to convert, "From" and "To" select units.
* To convert a variable value, click on the middle
-right button; the top-right one will prompt for
a value, and the bottom-right button selects the
variable to store the result.
MACROS: ZERO, INTEGRAL, dF/dt, SUM
Macros apply to the current line treated as F(t).
The result is sent to the destination variable.
* [ZERO] finds a (single) zero of F(t) within a
given interval (bisection method is used)
* [INTGR] computes integral of F(t) over a given
interval with given accuracy (Romberg algorithm)
* [dF/dt] computes dF(t)/dt at given t value
(quadratic approximation with given finite step)
* [SUM] computes a sum of F(t) for given range and
step in t.
When the program asks for required macro parame-
ters, only numbers or variable names (including
Pi and Ee) can be entered - no expressions.
FUNCTION OPTIMIZATION
The [OPTIM] button on the Macro Panel allows
for finding a minumum of the current line, which
is treated as a function of variables from the
A..C range.
Up to 3 variables (in El_Cal: 9) can be selected
as arguments; the function value will be returned
in the Destination Variable.
The algorithm, of course, may end up in a local
extremum (or a region with a very low function
gradient), so proper care should be excercised.
Wrong choice of the initial approximation (or of
the function itself) may lead to a false solution
or to an arithmetic error.
POLYNOMIAL ROOTS
[ROOTS] calls the Root Panel, from where roots
of polynomes up to the fourth degree can be found:
* The degree is chosen by clicking on the buttons
[1]...[2]. The equation is then displayed below.
* [COMP] solves the equation, with the contents of
variables A..C as parameters (with non-zero A!).
Depending on the status of these variables, some
degree choices will sometimes be disabled.
* Real roots will be shown in the Variable Panel
as u1..u2, and the components of complex conju-
gate root pairs - as Re and Im.
NON-LINEAR EQUATION SYSTEMS
[EQUAT] will display the Equation Panel. Systems
of up to 3 equations F(A..C)=0 can be solved from
here, with expression lines serving for F() selec-
ted with use of the [1]..[3] buttons.
Clicking on [SOLV] will show a dialog asking for
selection of unknown variables. Their number must
be equal to the number of equations. The variables
should contain reasonable initial guesstimates.
The used Newton-Raphson method has been modified
to accept less accurate initial guesses. If no so-
lution is found, an alert will be displayed.
FUNCTION PLOTTING
Click on [PLOTS] to go to the Plotting Panel:
* [PLOT] draws the selected lines as functions of
the dummy t. (A..Z can be used as constants).
* Sub_Cal asks for the t- and y-limits.
* Points for which the function cannot be computed
will be just ignored.
* Pressing any key will suspend the plotting.
* Click in the plot area for coordinate readout.
DIFFERENTIAL EQUATIONS - GENERAL
Sub_Cal can solve ODE systems of the form
dy1/dt = F1(t,y1,yN), ..., dyN/dt = FN(t,y1,yN)
where N may range from 1 to 3. The equations have
to be defined by Display Lines:
* Sub_Cal variable t is used for t above;
* Variables A..C are used for y1..yN;
* For each line its Destination Variable reflects
the y whose dy/dt this line computes.
Black buttons in the Differential Equation Panel
(invoked by [DIFF]) denote Display Lines defining
the ODE system. Each of them has to have a diffe-
rent Destination Variable. Sub_Cal variables not
used in this way will be treated as constants.
DIFFERENTIAL EQUATIONS: SINGLE SOLUTION
To solve an ODE system for a single value of t:
* Enter the equations as described above, select
the appropriate line buttons (make sure no buton
is outlined) in the Differental Equation Panel.
* Make sure that the initial y-values are stored
in corresponding variables A..C;
* Click on [INTEG].
* Answer the prompt for initial and final t-values
and for the integration accuracy in y. Done.
Pressing any key will suspend the computation with
an option to abort.
The resulting y-values will be displayed in their
variable fields.
DIFFERENTIAL EQUATIONS: PLOTTING
The ODE system can also be solved over an interval
with any and all of the solutions plotted.
* Functions to plot are identified by outlining of
their corresponding buttons (click on a selected
line button to outline it). The plot will be
drawn if one or more line buttons are outlined.
* First a prompt will ask for the starting t-value
which may be inside or outside of the plot range
* Then a regular plot range dialog will ask for
the ranges in t and y. The former will be used
for both plotting and integration.
Plotting can be suspended by pressing any key.
There is no display of y-values in this mode.
STATISTICAL OPERATIONS - GENERAL
* Available modes are X, XY, WXY (with weights W)
and DXY (with Y-errors D). Clicking on [CLEAR]
or changing the mode (button at bottom left)
clears the data buffer. The current and maximum
number of data points are shown on the right.
* The data buffer can hold up to 48 points in the
X mode, up to 24 in the XY mode and up to 16 in
the WXY and DXY modes.
(In El_Cal number of data points is limited only
by available memory).
DATA BUFFER MANIPULATION - I
Clicking inside the Data Window selects a data
point and presents you with the following options:
* <Edit> - to modify the selected data point,
* <Insert ⇧> or <Insert ⇩> - inserts a new point
before or after the selected one,
* <Move ⇧>, <Move ⇩>, <Move ⇧⇧>, <Move ⇩⇩> - moves
the selected data point up or down by one posi-
tion or all the way, respectively;
* <Delete> - deletes the point from the buffer.
To add a new data point to the buffer, click on
the last data point (or in the empty space below).
Double-clicking on a value in the Data Window
allows for modifying just that value.
DATA BUFFER MANIPULATION - II
The window scroll bar has keyboard equivalents:
⇧ and ⇩ (page), ⇦ and ⇨ (line), Clr/Home (to top).
To exit the window, click on the closer box
(top-left) or press the Esc key.
Clicking on the top-right box in the Data Window
presents a menu for global operations:
- <Sort by X>, <Sort by Y> - in increasing order;
- <Flip X⇦⇨Y> - swap the X- and Y-columns;
- <X⇦F()> etc. fill a column with values of F()
from the Display Line. X,Y,D and W are interpre-
ted in F() as data values (if a column exists in
the current mode), and t - as the point index.
- <Undelete> restores the last deleted data point.
STATISTICAL OPERATIONS IN THE X-MODE
* [HIST] - plots a histogram of the data; you will
be prompted for the range and number of bins
(maximum of 40).
* [PARAM] - as above, but mean and standard devia-
tion will be returned as m and s, as well as the
error of the mean, dm (computed for the confi-
dence level last entered with the [()] button).
* [FIT] fits the data with a normalized distribu-
tion defined by the current line as F(t|A..C) -
a function of t, with parameters from the A..C
range. See the next page for more.
DISTRIBUTION FITTING
The distribution-fitting mode is permanently set
to a chi-square fit. Only the bins within the plot
range will be accounted for, and bins with less
than 6 data points will be combined.
The destination variable will contain the chi-
square per degree of freedom (no. of bins minus
no. of parameters minus one).
(El_Cal has also another mode, a maximum likeli-
hood fit).
Initial "reasonable guess" values are expected
in parameter variables.
STATISTICAL OPERATIONS IN XY, WXY AND DXY MODES
* [SCATT] draws a scatter-plot of data points;
* [REGR] - as above, with linear or polynomial
regression. First use the degree button, [n], to
set the degree (1 or 2). The root-mean-square
deviation from line per degree of freedom will
be returned as s (weighted in WXY and DXY modes)
For degree=1, the linear regression analysis will
include the correlation coefficient, r, and slope
and intercept errors, d1 and d0, respectively. The
line confidence region will also be drawn for the
level as set with the [()] button.
* [FIT] - see the next page.
MULTI-PARAMETER CURVE FITTING
[FIT] will fit the XY, WXY or DXY data sequence
with an F(t|A..C) as defined by the current line
(t as argument, A..C as estimated function parame-
ters).
The fitting algorithm minimizes the sum of
squared deviations (El_Cal canm also minimize the
sum of absolute values).
Parameter variables should be initialized to
reasonable values (a good choice will save time).
Root-mean-square deviation per degree of freedom
(weighted in DXY and WXY modes) will be returned
in the destination variable.
Reserved
Reserved
DATA OBJECTS IN LINEAR ALGEBRA PANEL
At any moment some of the buttons are disabled, to
make illegal command sequences impossible.
* To see a data object, double-click on its button
[M1]..[S3]. An array form will be displayed with
all the object's components visible at once.
* To modify a component, click on it (double click
will also clear the input field).
* Clicking on [PUT] will send the displayed value
to the selected El_Cal variable A..Z, on [GET] -
fetch a value from the variable to the display.
* The whole object will not be modified until the
[Set] button is pressed to exit the object form.
SIMPLE VECTOR AND MATRIX OPERATIONS
To use an object in a command, click on its
button. The following operations are available:
- Assignment, [⇨], e.g. M1 ⇨ M3 (store M1 in M3);
- Addiction and subtraction: [+] and [-];
- Scalar (inner) product, [.]: V.V ⇨ S
- Product, [*], for various operands and results:
S*S ⇨ S S*V ⇨ V V*S ⇨ V S*M ⇨ M M*S ⇨ M
V*V ⇨ M V*M ⇨ V M*V ⇨ V M*M ⇨ M
It is clear from the context, whether the vectors
are of row or column nature.
Additionally, [*] can be used to compute the
cross-product of vectors size three: V*V ⇨ V.
MORE MATRIX OPERATIONS
- [DET] for determinant: Det M ⇨ S
- [TRN] for transposition: Trn M ⇨ M
- [INV] for inversion: Inv M ⇨ M
- [EQU] solves a system of linear equations:
M Equ V ⇨ V, where M is the left side matrix
and the first V - the right side vector.
A command consists of one or two arguments, an
operator and destination object, e.g. V1*M1 ⇨ V3.
It will be executed only after [OK] is pressed.
Usually [⇨] is entered by the program itself.
The [STORE], [FETCH] and [PRINT] buttons invoke
disk and print operations for single data objects.
OTHER LINEAR ALGEBRA OPTIONS
Other operations in the Linear Algebra Panel are:
- [SIZE] sets the matrix/vector size to 2..4;
- [SAVE] and [LOAD] perform disk I/O for all data
objects at once (in a single file);
- [AUTO] enables auto-scroll in data object entry;
- [EXP] toggles on/off the floating point data
display format;
- [ECHO] activates echoing of all operations to
the printer (symbolic notation only);
- [TEXT] allows to output any text to the printer.
All printer operations can be redirected to a disk
file with use of the <Options|Print to Disk> menu
entry.
ABOUT EL_CAL
Sub_Cal is a limited subset of El_Cal, a more
powerful mathematical toolbox, available from
Debonair Software. If you find Sub_Cal useful, the
chances are one day you will need the "real thing"
- and the buttons disabled permanently in Sub_Cal
should give you some information about the extra
features and capabilities available in El_Cal.
More about the differences between both programs
can be found in the accompanying SUB_CAL.DOC file.
In case of any questions or doubts, do not hesi-
tate to contact us (see the next page).
If you do not need El_Cal, we still hope you
will like and enjoy Sub_Cal.
DEBONAIR SOFTWARE
EL_CAL sells for $63 (v.2.0) or $44 (v.1.4, no
differential equations) and is distributed by
Debonair Software
P.O.Box 521166
Salt Lake City, UT 84152-1166.
[Checks or money orders, outside continental US
please add $5 extra.]
Technical correspondence can be also forwarded
electronically directly to the author:
CompuServe: 70611,2552
GEnie: J.WROTNIAK